class ProjectMenuModel {
  num? code;
  List<ProjectMenuItemModel?>? data;
  String? message;

  ProjectMenuModel({this.code, this.data, this.message});
  ProjectMenuModel.fromJson(Map<String, dynamic> json) {
    code = json['code']?.toInt();
    if (json['data'] != null) {
      final v = json['data'];
      final arr0 = <ProjectMenuItemModel>[];
      v.forEach((v) {
        arr0.add(ProjectMenuItemModel.fromJson(v));
      });
      data = arr0;
    }
    message = json['message']?.toString();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['code'] = code;
    if (this.data != null) {
      final v = this.data;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v!.toJson());
      });
      data['data'] = arr0;
      
    }
    data['message'] = message;
    return data;
  }
}

class ProjectMenuItemModel {
  int? id;
  String? name;
  List<ProjectMenuItemModelChildren?>? children;

  ProjectMenuItemModel({this.id, this.name, this.children});
  ProjectMenuItemModel.fromJson(Map<String, dynamic> json) {
    id = json['id']?.toInt();
    name = json['name']?.toString();
    if (json['children'] != null) {
      final v = json['children'];
      final arr0 = <ProjectMenuItemModelChildren>[];
      v.forEach((v) {
        arr0.add(ProjectMenuItemModelChildren.fromJson(v));
      });
      children = arr0;
    }
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    if (children != null) {
      final v = children;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v!.toJson());
      });
      data['children'] = arr0;
    }
    return data;
  }
}

class ProjectMenuItemModelChildren {
  int? id;
  String? name;
  String? path;
  int? author;
  int? method;

  ProjectMenuItemModelChildren({
    this.id,
    this.name,
    this.path,
    this.author,
    this.method,
  });
  ProjectMenuItemModelChildren.fromJson(Map<String, dynamic> json) {
    id = json['id']?.toInt();
    name = json['name']?.toString();
    path = json['path']?.toString();
    author = json['author']?.toInt();
    method = json['method']?.toInt();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    data['path'] = path;
    data['author'] = author;
    data['method'] = method;
    return data;
  }
}
